<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

<script>
    // 模板字符串
    let name = 'tom'
    let age = 18
    // let str = '我的名字是' + name + '我的年龄是' + age
    let str = `我的名字是${name}我的年龄是${age}`

    console.log(str)

    let total = `${[1,2,3,4].join('')}`
    let total1 = `${1 < 2 ? 100 : 1000}`

    console.log(total)
    console.log(typeof total)
    console.log(total1)



 

</script>



</body>
</html>